Skip to content

blockdev: Handle ESP discovery on Intel VROC RAID devices#2129

Merged
cgwalters merged 1 commit intobootc-dev:mainfrom
ckyrouac:multiple-backing-devices-raid
Apr 8, 2026
Merged

blockdev: Handle ESP discovery on Intel VROC RAID devices#2129
cgwalters merged 1 commit intobootc-dev:mainfrom
ckyrouac:multiple-backing-devices-raid

Conversation

@ckyrouac
Copy link
Copy Markdown
Collaborator

@ckyrouac ckyrouac commented Apr 7, 2026

Intel VROC creates a topology where NVMe disks have MD RAID arrays as children, with the actual partitions (including the ESP) nested under the RAID array: nvme0n1 → md126 → md126p1 (ESP).

Previously find_partition_of_esp_optional() only searched direct children, so it would miss the ESP in this layout. Now it recurses into children that carry their own partition table, which handles the firmware RAID case naturally.

Add a lsblk JSON fixture representing a dual-NVMe firmware RAID1 layout and a test validating that ESP discovery works through the RAID layer.

Assisted-by: Claude Code (Opus 4)

Intel VROC creates a topology where NVMe disks have
MD RAID arrays as children, with the actual partitions (including the
ESP) nested under the RAID array: nvme0n1 → md126 → md126p1 (ESP).

Previously find_partition_of_esp_optional() only searched direct
children, so it would miss the ESP in this layout. Now it recurses
into children that carry their own partition table, which handles
the firmware RAID case naturally.

Add a lsblk JSON fixture representing a dual-NVMe firmware RAID1
layout and a test validating that ESP discovery works through the
RAID layer.

Assisted-by: Claude Code (Opus 4)
Signed-off-by: ckyrouac <ckyrouac@redhat.com>
@ckyrouac ckyrouac requested a review from cgwalters April 7, 2026 14:04
@bootc-bot bootc-bot bot requested a review from jmarrero April 7, 2026 14:05
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the find_partition_of_esp_optional function in the blockdev crate to support recursive searching for EFI System Partitions (ESP). This change allows the system to correctly identify ESPs in complex storage hierarchies, such as firmware RAID arrays (e.g., VROC), where partitions are nested within child devices. Additionally, new test fixtures and unit tests for software RAID and VROC configurations have been added to verify the recursive detection logic. I have no feedback to provide.

Comment on lines +205 to +206
// Recurse into children that carry their own partition table, such as
// firmware RAID arrays (disk → md array → partitions).
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional followup: I think this works and is correct. However...just thinking about this more, what feels architecturally cleaner is a model where we always walk up to all parents, then gather all children from there, then check all ESPs we found - deduplicating here by UUID - since in the VROC case we see the same ESP via multiple paths.

@cgwalters cgwalters enabled auto-merge (rebase) April 7, 2026 15:00
@cgwalters
Copy link
Copy Markdown
Collaborator

The c9s one failed with

[920](https://github.com/bootc-dev/bootc/actions/runs/24085638686/job/70303367001?pr=2129#step:10:3921)
                        content: [TRACE bootupd::efi] Unmounted
                        content: Installation complete!
                        content: umount: /var/mnt/esp_check: target is busy.
                        content: Error:   × Dual ESP test failed: {msg: External command had a non-zero exit code,
                        content:   │ debug: NonZeroExitCode { exit_code: 32, span: Span { start: 99519, end:
                        content:   │ 99525 } }, raw: NonZeroExitCode { exit_code: 32, span: Span { start:
                        content:   │ 99519, end: 99525 } }, exit_code: 32}
                        content:      ╭─[/var/tmp/tmt/bootc-tmt-jp3dinqf-tmt-plans-integration-plan-41-multi-device-esp/tmt/plans/integration/plan-41-multi-device-esp/discover/default-0/tests/tmt/tests/booted/test-multi-device-esp.nu:267:9]
                        content:  266 │         rm -f $disk1 $disk2
                        content:  267 │         error make {msg: $"Dual ESP test failed: ($e)"}
                        content:      ·         ─────┬────
                        content:      ·              ╰── originates from here
                        content:  268 │     }
                        content:      ╰────
                        content: 
                        content: Connection to localhost

I restarted it

@cgwalters cgwalters merged commit b1fe5d6 into bootc-dev:main Apr 8, 2026
169 of 180 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants